<!DOCTYPE html><html lang="en" data-theme="dark"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Chinese Version Vocaloid AI Tuner Feasibility Test | Yang's Harbor</title><meta name="keywords" content="记录,Python,整理"><meta name="author" content="✨YangSier✨,hobart.yang@qq.com"><meta name="copyright" content="✨YangSier✨"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#0d0d0d"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><meta name="description" content="The purpose of this test is to show that there is correlation between modifiable argument in Vocaloid project file and quality of tuning. What is Vocaloid? Here is a link to wiki page. Vocaloid:  Voca">
<meta property="og:type" content="article">
<meta property="og:title" content="Chinese Version Vocaloid AI Tuner Feasibility Test">
<meta property="og:url" content="https://discover304.top/2021/01/14/2021q1/023-AI-tuner-feasibility-test/index.html">
<meta property="og:site_name" content="Yang&#39;s Harbor">
<meta property="og:description" content="The purpose of this test is to show that there is correlation between modifiable argument in Vocaloid project file and quality of tuning. What is Vocaloid? Here is a link to wiki page. Vocaloid:  Voca">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://th.bing.com/th/id/R28765e26714f5153026a15b67cb6fcf0?rik=SOYcApIlPZfQFg&riu=http%3a%2f%2fi2.hdslb.com%2fbfs%2farchive%2f6eedb4d5814e27b8bd9c202c93eb7479b59de9a4.jpg&ehk=PjnR2Od1wLaa4JrXwF2G5bhtjyacieFcSC5ux4nWb8s%3d&risl=&pid=ImgRaw">
<meta property="article:published_time" content="2021-01-14T10:00:00.000Z">
<meta property="article:modified_time" content="2021-09-16T07:31:26.000Z">
<meta property="article:author" content="✨YangSier✨">
<meta property="article:tag" content="记录">
<meta property="article:tag" content="Python">
<meta property="article:tag" content="整理">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://th.bing.com/th/id/R28765e26714f5153026a15b67cb6fcf0?rik=SOYcApIlPZfQFg&riu=http%3a%2f%2fi2.hdslb.com%2fbfs%2farchive%2f6eedb4d5814e27b8bd9c202c93eb7479b59de9a4.jpg&ehk=PjnR2Od1wLaa4JrXwF2G5bhtjyacieFcSC5ux4nWb8s%3d&risl=&pid=ImgRaw"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://discover304.top/2021/01/14/2021q1/023-AI-tuner-feasibility-test/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="preconnect" href="//zz.bdstatic.com"/><meta name="google-site-verification" content="ilqpfk3vkgzDNNikz_V37-DOvRyi5wv4Hoi_eyBqvTg"/><meta name="msvalidate.01" content="49D9A50CCF9744E17274791468EDB517"/><meta name="baidu-site-verification" content="code-V24KosyVh1"/><meta name="360-site-verification" content="bd8859c3d74dfa3e8aeee9db30c94bd2"/><meta name="yandex-verification" content="f28ec9bbd50c56f5"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?8030f6052f2fed6a4704d96619f090d6";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><link rel="stylesheet" href="/css/font.css" media="print" onload="this.media='all'"><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"We didn't find any results for the search: ${query}"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: {"limitDay":365,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: 'Copy successfully',
    error: 'Copy error',
    noSupport: 'The browser does not support'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: 'days',
  date_suffix: {
    just: 'Just',
    min: 'minutes ago',
    hour: 'hours ago',
    day: 'days ago',
    month: 'months ago'
  },
  copyright: {"limitCount":200,"languages":{"author":"Author: ✨YangSier✨","link":"Link: ","source":"Source: Yang's Harbor","info":"Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source."}},
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"Traditional Chinese Activated Manually","cht_to_chs":"Simplified Chinese Activated Manually","day_to_night":"Dark Mode Activated Manually","night_to_day":"Light Mode Activated Manually","bgLight":"#ffc910","bgDark":"#02c3f6","position":"bottom-left"},
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: true,
  islazyload: true,
  isanchor: true
};

var saveToLocal = {
  set: function setWithExpiry(key, value, ttl) {
    const now = new Date()
    const expiryDay = ttl * 86400000
    const item = {
      value: value,
      expiry: now.getTime() + expiryDay,
    }
    localStorage.setItem(key, JSON.stringify(item))
  },

  get: function getWithExpiry(key) {
    const itemStr = localStorage.getItem(key)

    if (!itemStr) {
      return undefined
    }
    const item = JSON.parse(itemStr)
    const now = new Date()

    if (now.getTime() > item.expiry) {
      localStorage.removeItem(key)
      return undefined
    }
    return item.value
  }
}

// https://stackoverflow.com/questions/16839698/jquery-getscript-alternative-in-native-javascript
const getScript = url => new Promise((resolve, reject) => {
  const script = document.createElement('script')
  script.src = url
  script.async = true
  script.onerror = reject
  script.onload = script.onreadystatechange = function() {
    const loadState = this.readyState
    if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
    script.onload = script.onreadystatechange = null
    resolve()
  }
  document.head.appendChild(script)
})</script><script id="config_change">var GLOBAL_CONFIG_SITE = { 
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2021-09-16 15:31:26'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(function () {  window.activateDarkMode = function () {
    document.documentElement.setAttribute('data-theme', 'dark')
    if (document.querySelector('meta[name="theme-color"]') !== null) {
      document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
    }
  }
  window.activateLightMode = function () {
    document.documentElement.setAttribute('data-theme', 'light')
   if (document.querySelector('meta[name="theme-color"]') !== null) {
      document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
    }
  }
  const autoChangeMode = 'false'
  const t = saveToLocal.get('theme')
  if (autoChangeMode === '1') {
    const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches
    const isLightMode = window.matchMedia('(prefers-color-scheme: light)').matches
    const isNotSpecified = window.matchMedia('(prefers-color-scheme: no-preference)').matches
    const hasNoSupport = !isDarkMode && !isLightMode && !isNotSpecified
    if (t === undefined) {
      if (isLightMode) activateLightMode()
      else if (isDarkMode) activateDarkMode()
      else if (isNotSpecified || hasNoSupport) {
        const now = new Date()
        const hour = now.getHours()
        const isNight = hour <= 6 || hour >= 18
        isNight ? activateDarkMode() : activateLightMode()
      }
      window.matchMedia('(prefers-color-scheme: dark)').addListener(function (e) {
        if (saveToLocal.get('theme') === undefined) {
          e.matches ? activateDarkMode() : activateLightMode()
        }
      })
    } else if (t === 'light') activateLightMode()
    else activateDarkMode()
  } else if (autoChangeMode === '2') {
    const now = new Date()
    const hour = now.getHours()
    const isNight = hour <= 6 || hour >= 18
    if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
    else if (t === 'light') activateLightMode()
    else activateDarkMode()
  } else {
    if (t === 'dark') activateDarkMode()
    else if (t === 'light') activateLightMode()
  }const asideStatus = saveToLocal.get('aside-status')
if (asideStatus !== undefined) {
   if (asideStatus === 'hide') {
     document.documentElement.classList.add('hide-aside')
   } else {
     document.documentElement.classList.remove('hide-aside')
   }
}})()</script><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="Yang's Harbor" type="application/atom+xml">
</head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">Loading...</div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" data-lazy-src="/img/head.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">243</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">88</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">Categories</div><div class="length-num">23</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> Links</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> Articles</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archive</span></a></li><li><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Category</span></a></li><li><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></li></ul></div></div></div></div><div id="body-wrap"><header class="post-bg" id="page-header" style="background-image: url(https://th.bing.com/th/id/R28765e26714f5153026a15b67cb6fcf0?rik=SOYcApIlPZfQFg&amp;riu=http%3a%2f%2fi2.hdslb.com%2fbfs%2farchive%2f6eedb4d5814e27b8bd9c202c93eb7479b59de9a4.jpg&amp;ehk=PjnR2Od1wLaa4JrXwF2G5bhtjyacieFcSC5ux4nWb8s%3d&amp;risl=&amp;pid=ImgRaw)"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">Yang's Harbor</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> Search</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> Home</span></a></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> Links</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> About</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> Articles</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> Archive</span></a></li><li><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> Category</span></a></li><li><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> Tags</span></a></li></ul></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">Chinese Version Vocaloid AI Tuner Feasibility Test</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">Created</span><time class="post-meta-date-created" datetime="2021-01-14T10:00:00.000Z" title="Created 2021-01-14 18:00:00">2021-01-14</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">Updated</span><time class="post-meta-date-updated" datetime="2021-09-16T07:31:26.000Z" title="Updated 2021-09-16 15:31:26">2021-09-16</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/NoteBook/">NoteBook</a><i class="fas fa-angle-right post-meta-separator"></i><i class="fas fa-inbox fa-fw post-meta-icon"></i><a class="post-meta-categories" href="/categories/NoteBook/GeneralNote/">GeneralNote</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><i class="far fa-file-word fa-fw post-meta-icon"></i><span class="post-meta-label">Word count:</span><span class="word-count">4.4k</span><span class="post-meta-separator">|</span><i class="far fa-clock fa-fw post-meta-icon"></i><span class="post-meta-label">Reading time:</span><span>27min</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">Post View:</span><span id="busuanzi_value_page_pv"></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><p>The purpose of this test is to show that there is correlation between modifiable argument in Vocaloid project file and quality of tuning.</p>
<p>What is Vocaloid? <a target="_blank" rel="noopener" href="https://en.wikipedia.org/wiki/Vocaloid">Here is a link to wiki page</a>.</p>
<p>Vocaloid:</p>
<blockquote>
<p>Vocaloid (ボーカロイド, Bōkaroido) is a singing voice synthesizer software product. Its signal processing part was developed through a joint research project led by Kenmochi Hideki at the Pompeu Fabra University in Barcelona, Spain, in 2000 and was not originally intended to be a full commercial project. Backed by the Yamaha Corporation, it developed the software into the commercial product “Vocaloid” which was released in 2004.</p>
</blockquote>
<p>Project github repo: https://github.com/Discover304/AI-Tuner</p>
<h2 id="Prepare-dataset"><a href="#Prepare-dataset" class="headerlink" title="Prepare dataset"></a>Prepare dataset</h2><p>In this part we will get a formated vsqx data in dictionary with 2 dimension infromation note and id.</p>
<ol>
<li>import vocaloid project (.vsqx) and extract all test related arguments (arg)</li>
<li>format all args to 960 length list where 960 is the time stamps</li>
</ol>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># adding path to system</span></span><br><span class="line"><span class="keyword">import</span> sys, os</span><br><span class="line">sys.path.append(os.getcwd())</span><br><span class="line"></span><br><span class="line"><span class="comment"># read the data index json file</span></span><br><span class="line"><span class="keyword">import</span> json</span><br><span class="line">dataPath = os.path.join(os.getcwd(), <span class="string">&#x27;VocaloidVSQXCollection&#x27;</span>)</span><br><span class="line"><span class="keyword">with</span> <span class="built_in">open</span>(os.path.join(dataPath,<span class="string">&quot;source.json&quot;</span>), <span class="string">&#x27;r&#x27;</span>,encoding=<span class="string">&#x27;utf-8&#x27;</span>) <span class="keyword">as</span> f:</span><br><span class="line">    source = json.load(f) <span class="comment"># source is a dictionary</span></span><br><span class="line">fileList = [source[sourceIndex][<span class="string">&quot;file&quot;</span>] <span class="keyword">for</span> sourceIndex <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(source))]</span><br><span class="line"></span><br><span class="line">[<span class="built_in">print</span>(<span class="built_in">str</span>(sourceIndex+<span class="number">1</span>) + <span class="string">&quot;. Thanks for the data from creator: &quot;</span> + source[sourceIndex][<span class="string">&quot;creator&quot;</span>] + <span class="string">&quot;\n\tSource of data: &quot;</span> + source[sourceIndex][<span class="string">&quot;website&quot;</span>] + <span class="string">&quot;\n&quot;</span>) <span class="keyword">for</span> sourceIndex <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(source))]</span><br><span class="line"></span><br><span class="line"><span class="comment"># initialise all reoslvers</span></span><br><span class="line"><span class="keyword">from</span> vocaloidDao <span class="keyword">import</span> vocaloidVSQXResolver</span><br><span class="line">resolverList = [vocaloidVSQXResolver(os.path.join(dataPath, fileName)) <span class="keyword">for</span> fileName <span class="keyword">in</span> fileList]</span><br></pre></td></tr></table></figure>

<pre><code>1. Thanks for the data from creator: 混音: リサRisa
    Source of data: https://www.vsqx.top/project/vn1801

2. Thanks for the data from creator: 扒谱：星葵/混音：seedking
    Source of data: https://www.vsqx.top/project/vn1743

3. Thanks for the data from creator: N/A
    Source of data: https://www.vsqx.top/project/vn1784

4. Thanks for the data from creator: vsqx:DZ韦元子
    Source of data: https://www.vsqx.top/project/vn1752

5. Thanks for the data from creator: N/A
    Source of data: https://www.vsqx.top/project/vn1749

6. Thanks for the data from creator: 填词~超监督乌鸦，千年食谱颂vsqx~的的的的的说，制作~cocok7
    Source of data: https://www.vsqx.top/project/vn1798

7. Thanks for the data from creator: 伴奏：小野道ono (https://www.dizzylab.net/albums/d/dlep02/)
    Source of data: https://www.vsqx.top/project/vn1788

8. Thanks for the data from creator: 调/混:邪云 扒谱:天啦噜我的串串儿
    Source of data: https://www.vsqx.top/project/vn1796

9. Thanks for the data from creator: 扒谱：磷元素P
    Source of data: https://www.vsqx.top/project/vn1753

10. Thanks for the data from creator: N/A
    Source of data: https://www.vsqx.top/project/vn1778
</code></pre>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># resolve all original data in parallel way, and save them to loacl</span></span><br><span class="line"><span class="keyword">from</span> vocaloidDao <span class="keyword">import</span> parallelResolve</span><br><span class="line"><span class="built_in">print</span>(<span class="string">&quot;It may take a while if the file are resolved for the first time.&quot;</span>)</span><br><span class="line">parallelResolve(resolverList)</span><br></pre></td></tr></table></figure>

<pre><code>It may take a while if the file are resolved for the first time.
local computer has: 16 cores

Parallal computing takes 0.00 seconds to finish.
</code></pre>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># load saved data</span></span><br><span class="line">VocaloidDataDfs = [resolver.loadFormatedVocaloidData() <span class="keyword">for</span> resolver <span class="keyword">in</span> resolverList]</span><br><span class="line"></span><br><span class="line"><span class="comment"># import as dataframe</span></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd </span><br><span class="line">VocaloidDataDf = pd.DataFrame()</span><br><span class="line"><span class="keyword">for</span> VocaloidDataDfIndex <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(VocaloidDataDfs)):</span><br><span class="line">    VocaloidDataDf = VocaloidDataDf.append(VocaloidDataDfs[VocaloidDataDfIndex])</span><br><span class="line">VocaloidDataDf = VocaloidDataDf.reset_index()</span><br><span class="line">VocaloidDataDf.head()</span><br></pre></td></tr></table></figure>

<pre><code>Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
Log: loaded 
</code></pre>
<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>index</th>
      <th>D</th>
      <th>G</th>
      <th>W</th>
      <th>P</th>
      <th>S</th>
      <th>VEL</th>
      <th>T</th>
      <th>OPE</th>
      <th>DUR</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6...</td>
      <td>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...</td>
      <td>[127, 127, 127, 127, 127, 127, 127, 127, 127, ...</td>
      <td>[90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 9...</td>
    </tr>
    <tr>
      <th>1</th>
      <td>1</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6...</td>
      <td>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...</td>
      <td>[127, 127, 127, 127, 127, 127, 127, 127, 127, ...</td>
      <td>[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 3...</td>
    </tr>
    <tr>
      <th>2</th>
      <td>2</td>
      <td>[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[2418, 2418, 2418, 2418, 2418, 2418, 2418, 241...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6...</td>
      <td>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...</td>
      <td>[127, 127, 127, 127, 127, 127, 127, 127, 127, ...</td>
      <td>[150, 150, 150, 150, 150, 150, 150, 150, 150, ...</td>
    </tr>
    <tr>
      <th>3</th>
      <td>3</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6...</td>
      <td>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...</td>
      <td>[127, 127, 127, 127, 127, 127, 127, 127, 127, ...</td>
      <td>[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 3...</td>
    </tr>
    <tr>
      <th>4</th>
      <td>4</td>
      <td>[55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 5...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...</td>
      <td>[64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 6...</td>
      <td>[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,...</td>
      <td>[127, 127, 127, 127, 127, 127, 127, 127, 127, ...</td>
      <td>[30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 3...</td>
    </tr>
  </tbody>
</table>
</div>




<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="number">2248</span>*<span class="number">9</span>*<span class="number">960</span></span><br></pre></td></tr></table></figure>




<pre><code>19422720
</code></pre>
<h2 id="Formating-data-before-evaluation"><a href="#Formating-data-before-evaluation" class="headerlink" title="Formating data before evaluation"></a>Formating data before evaluation</h2><p>The above dataframe is scary, with 19 million data as 3 dimension. We have to reduce the data by extract the main features of each 960 vector, and join to a dataframe. So, the next challenge we face is how to extract this features.</p>
<p>We decide to take following data:</p>
<blockquote>
<ol>
<li>Continuous: VEL OPE DUR</li>
<li>Discrete: D G W P S</li>
</ol>
<ul>
<li>fearure without 0s: <ul>
<li>mid, mean, sd, mod</li>
</ul>
</li>
</ul>
<ol start="3">
<li><code>Continuous</code> means one note one value, <code>Discrete</code> means one time stamp one value</li>
</ol>
</blockquote>
<p>See more: https://www.cnblogs.com/xingshansi/p/6815217.html</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">def</span> <span class="title function_">zcr</span>(<span class="params">dataArray</span>):</span><br><span class="line">    <span class="keyword">pass</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>


<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># get discrete args fearure</span></span><br><span class="line">discreteArgsDf = VocaloidDataDf[[<span class="string">&quot;VEL&quot;</span>,<span class="string">&quot;OPE&quot;</span>,<span class="string">&quot;DUR&quot;</span>]].applymap(<span class="keyword">lambda</span> x : x[<span class="number">0</span>])</span><br><span class="line">discreteArgsDf.columns = discreteArgsDf.columns.<span class="built_in">map</span>(<span class="keyword">lambda</span> x : x+(<span class="string">&quot;-SINGLE&quot;</span>))</span><br><span class="line">discreteArgsDf.head()</span><br></pre></td></tr></table></figure>




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>VEL-SINGLE</th>
      <th>OPE-SINGLE</th>
      <th>DUR-SINGLE</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>64</td>
      <td>127</td>
      <td>90</td>
    </tr>
    <tr>
      <th>1</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
    </tr>
    <tr>
      <th>2</th>
      <td>64</td>
      <td>127</td>
      <td>150</td>
    </tr>
    <tr>
      <th>3</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
    </tr>
    <tr>
      <th>4</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
    </tr>
  </tbody>
</table>
</div>




<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># get continuous args feature</span></span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"></span><br><span class="line"><span class="comment">## mean</span></span><br><span class="line">continuousArgsDf = pd.DataFrame()</span><br><span class="line">continuousArgsDf = VocaloidDataDf[[<span class="string">&quot;D&quot;</span>,<span class="string">&quot;G&quot;</span>,<span class="string">&quot;W&quot;</span>,<span class="string">&quot;P&quot;</span>,<span class="string">&quot;S&quot;</span>]].applymap(<span class="keyword">lambda</span> x : np.mean([i <span class="keyword">for</span> i <span class="keyword">in</span> x <span class="keyword">if</span> i!=<span class="number">0</span>]+[<span class="number">0</span>]))</span><br><span class="line">continuousArgsDf.columns = continuousArgsDf.columns.<span class="built_in">map</span>(<span class="keyword">lambda</span> x : x+(<span class="string">&quot;-MEAN&quot;</span>))</span><br><span class="line"></span><br><span class="line"><span class="comment"># without 0s</span></span><br><span class="line"><span class="keyword">from</span> scipy <span class="keyword">import</span> stats</span><br><span class="line"><span class="comment">## list all function we need </span></span><br><span class="line">aspectDict = &#123;<span class="string">&quot;-MID&quot;</span>: np.median, <span class="string">&quot;-SD&quot;</span>: np.std, <span class="string">&quot;-MOD&quot;</span>: <span class="keyword">lambda</span> x : stats.mode(x)[<span class="number">0</span>][<span class="number">0</span>]&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">## prepare a mapping function</span></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">appendAspect</span>(<span class="params"><span class="built_in">dict</span>, continuousArgsDf</span>):</span><br><span class="line">    <span class="keyword">for</span> key <span class="keyword">in</span> <span class="built_in">dict</span>.keys():</span><br><span class="line">        continuousArgsDfTemp = VocaloidDataDf[[<span class="string">&quot;D&quot;</span>,<span class="string">&quot;G&quot;</span>,<span class="string">&quot;W&quot;</span>,<span class="string">&quot;P&quot;</span>,<span class="string">&quot;S&quot;</span>]].applymap(<span class="keyword">lambda</span> x : <span class="built_in">dict</span>[key]([i <span class="keyword">for</span> i <span class="keyword">in</span> x <span class="keyword">if</span> i!=<span class="number">0</span>]+[<span class="number">0</span>]))</span><br><span class="line">        continuousArgsDfTemp.columns = continuousArgsDfTemp.columns.<span class="built_in">map</span>(<span class="keyword">lambda</span> x : x+(key))</span><br><span class="line">        continuousArgsDf = continuousArgsDf.join(continuousArgsDfTemp,on=continuousArgsDf.index)</span><br><span class="line">    <span class="keyword">return</span> continuousArgsDf</span><br><span class="line"><span class="comment">## apply mapping function to our data set</span></span><br><span class="line">continuousArgsDf = appendAspect(aspectDict,continuousArgsDf)</span><br><span class="line"></span><br><span class="line">continuousArgsDf.head()</span><br></pre></td></tr></table></figure>




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>D-MEAN</th>
      <th>G-MEAN</th>
      <th>W-MEAN</th>
      <th>P-MEAN</th>
      <th>S-MEAN</th>
      <th>D-MID</th>
      <th>G-MID</th>
      <th>W-MID</th>
      <th>P-MID</th>
      <th>S-MID</th>
      <th>D-SD</th>
      <th>G-SD</th>
      <th>W-SD</th>
      <th>P-SD</th>
      <th>S-SD</th>
      <th>D-MOD</th>
      <th>G-MOD</th>
      <th>W-MOD</th>
      <th>P-MOD</th>
      <th>S-MOD</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <th>2</th>
      <td>63.576159</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>2401.986755</td>
      <td>0.0</td>
      <td>64.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>2418.0</td>
      <td>0.0</td>
      <td>5.190972</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>196.121397</td>
      <td>0.0</td>
      <td>64</td>
      <td>0</td>
      <td>0</td>
      <td>2418</td>
      <td>0</td>
    </tr>
    <tr>
      <th>3</th>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <th>4</th>
      <td>53.225806</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>55.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>9.717658</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>55</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
  </tbody>
</table>
</div>




<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># join both discrete and continuous args dataframe</span></span><br><span class="line">argsDf = pd.DataFrame.join(discreteArgsDf, continuousArgsDf, on=discreteArgsDf.index)</span><br><span class="line"></span><br><span class="line">argsDf.head()</span><br></pre></td></tr></table></figure>




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>VEL-SINGLE</th>
      <th>OPE-SINGLE</th>
      <th>DUR-SINGLE</th>
      <th>D-MEAN</th>
      <th>G-MEAN</th>
      <th>W-MEAN</th>
      <th>P-MEAN</th>
      <th>S-MEAN</th>
      <th>D-MID</th>
      <th>G-MID</th>
      <th>...</th>
      <th>D-SD</th>
      <th>G-SD</th>
      <th>W-SD</th>
      <th>P-SD</th>
      <th>S-SD</th>
      <th>D-MOD</th>
      <th>G-MOD</th>
      <th>W-MOD</th>
      <th>P-MOD</th>
      <th>S-MOD</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>64</td>
      <td>127</td>
      <td>90</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <th>2</th>
      <td>64</td>
      <td>127</td>
      <td>150</td>
      <td>63.576159</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>2401.986755</td>
      <td>0.0</td>
      <td>64.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>5.190972</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>196.121397</td>
      <td>0.0</td>
      <td>64</td>
      <td>0</td>
      <td>0</td>
      <td>2418</td>
      <td>0</td>
    </tr>
    <tr>
      <th>3</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
    <tr>
      <th>4</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
      <td>53.225806</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>55.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>9.717658</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>55</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
    </tr>
  </tbody>
</table>
<p>5 rows × 23 columns</p>
</div>




<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># get the rank list from our data list file (we has already import as json)</span></span><br><span class="line">rankList = []</span><br><span class="line"><span class="keyword">for</span> resolverIndex <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(resolverList)):</span><br><span class="line">    noteNum = resolverList[resolverIndex].noteNum</span><br><span class="line">    rank = source[resolverIndex][<span class="string">&quot;rank&quot;</span>]</span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(noteNum):</span><br><span class="line">        rankList+=[rank]</span><br><span class="line"><span class="comment">## format to data frame</span></span><br><span class="line">rankDf = pd.DataFrame(&#123;<span class="string">&quot;RANK&quot;</span>:rankList&#125;)</span><br><span class="line"></span><br><span class="line">rankDf.head()</span><br></pre></td></tr></table></figure>




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>RANK</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>6</td>
    </tr>
    <tr>
      <th>1</th>
      <td>6</td>
    </tr>
    <tr>
      <th>2</th>
      <td>6</td>
    </tr>
    <tr>
      <th>3</th>
      <td>6</td>
    </tr>
    <tr>
      <th>4</th>
      <td>6</td>
    </tr>
  </tbody>
</table>
</div>




<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># join our args rank dataframe together</span></span><br><span class="line">dataDf = argsDf.join(rankDf, on=rankDf.index)</span><br><span class="line"></span><br><span class="line">dataDf.head()</span><br></pre></td></tr></table></figure>




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>VEL-SINGLE</th>
      <th>OPE-SINGLE</th>
      <th>DUR-SINGLE</th>
      <th>D-MEAN</th>
      <th>G-MEAN</th>
      <th>W-MEAN</th>
      <th>P-MEAN</th>
      <th>S-MEAN</th>
      <th>D-MID</th>
      <th>G-MID</th>
      <th>...</th>
      <th>G-SD</th>
      <th>W-SD</th>
      <th>P-SD</th>
      <th>S-SD</th>
      <th>D-MOD</th>
      <th>G-MOD</th>
      <th>W-MOD</th>
      <th>P-MOD</th>
      <th>S-MOD</th>
      <th>RANK</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>64</td>
      <td>127</td>
      <td>90</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>6</td>
    </tr>
    <tr>
      <th>1</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>6</td>
    </tr>
    <tr>
      <th>2</th>
      <td>64</td>
      <td>127</td>
      <td>150</td>
      <td>63.576159</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>2401.986755</td>
      <td>0.0</td>
      <td>64.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>196.121397</td>
      <td>0.0</td>
      <td>64</td>
      <td>0</td>
      <td>0</td>
      <td>2418</td>
      <td>0</td>
      <td>6</td>
    </tr>
    <tr>
      <th>3</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>6</td>
    </tr>
    <tr>
      <th>4</th>
      <td>64</td>
      <td>127</td>
      <td>30</td>
      <td>53.225806</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>55.0</td>
      <td>0.0</td>
      <td>...</td>
      <td>0.0</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>55</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>0</td>
      <td>6</td>
    </tr>
  </tbody>
</table>
<p>5 rows × 24 columns</p>
</div>



<h2 id="Clean-our-data"><a href="#Clean-our-data" class="headerlink" title="Clean our data"></a>Clean our data</h2><ol>
<li>delete all data that the dur longer than 1.5*IQR</li>
<li>remove all 0 column</li>
</ol>
<p>Notice: any other cleaning process should be done in this step</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">l = np.quantile(dataDf[<span class="string">&#x27;DUR-SINGLE&#x27;</span>],<span class="number">0.25</span>)</span><br><span class="line">h = np.quantile(dataDf[<span class="string">&#x27;DUR-SINGLE&#x27;</span>],<span class="number">0.75</span>)</span><br><span class="line">IQR = h+<span class="number">1.5</span>*(h-l)</span><br></pre></td></tr></table></figure>


<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">dataDf = dataDf[dataDf[<span class="string">&#x27;DUR-SINGLE&#x27;</span>]&lt;=IQR].reset_index()</span><br><span class="line">dataDf = dataDf.drop(columns=[<span class="string">&quot;index&quot;</span>])</span><br><span class="line">dataDf = dataDf.transpose()[dataDf.<span class="built_in">any</span>().values].transpose()</span><br></pre></td></tr></table></figure>

<h2 id="Observe-data"><a href="#Observe-data" class="headerlink" title="Observe data"></a>Observe data</h2><p>Perform the following steps:</p>
<ol>
<li>normalise our dataset (we choose to use normaliser instead of standardiser, because there is a limit in the score which is about 100, it is more meaningful if we use normaliser)</li>
<li>play with data to see if there are some observable trend of data</li>
<li>plot the heat map of regression coefficient, and leave one argument from the pair with higher value</li>
<li>fit to PCA modle, plot the corresponding percentage variance in a scree plot, combine the first several PCA</li>
<li>regress the MSE of sound onto the combined PCA</li>
</ol>
<p>If the MSE is reasonaly small, we can accept this result.</p>
<h3 id="Normalisation-and-Standardization"><a href="#Normalisation-and-Standardization" class="headerlink" title="Normalisation and Standardization"></a>Normalisation and Standardization</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># define a normaliser</span></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">normalizer</span>(<span class="params">dataArray</span>):</span><br><span class="line">    <span class="keyword">if</span> dataArray.<span class="built_in">max</span>() - dataArray.<span class="built_in">min</span>() == <span class="number">0</span>:</span><br><span class="line">        <span class="keyword">return</span> dataArray</span><br><span class="line">    <span class="keyword">return</span> (dataArray-dataArray.<span class="built_in">min</span>())/(dataArray.<span class="built_in">max</span>() - dataArray.<span class="built_in">min</span>())</span><br><span class="line"></span><br><span class="line"><span class="comment"># define a standardizer</span></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">standardizer</span>(<span class="params">dataArray</span>):</span><br><span class="line">    <span class="keyword">if</span> dataArray.<span class="built_in">max</span>() - dataArray.<span class="built_in">min</span>() == <span class="number">0</span>:</span><br><span class="line">        <span class="keyword">return</span> dataArray</span><br><span class="line">    <span class="keyword">return</span> (dataArray-dataArray.mean())/dataArray.std()</span><br><span class="line"></span><br><span class="line">dataDfNormalized = dataDf.apply(normalizer)</span><br><span class="line">dataDfNormalized.head()</span><br></pre></td></tr></table></figure>




<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }

<pre><code>.dataframe tbody tr th &#123;
    vertical-align: top;
&#125;

.dataframe thead th &#123;
    text-align: right;
&#125;
</code></pre>
<p></style></p>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>VEL-SINGLE</th>
      <th>OPE-SINGLE</th>
      <th>DUR-SINGLE</th>
      <th>D-MEAN</th>
      <th>G-MEAN</th>
      <th>P-MEAN</th>
      <th>S-MEAN</th>
      <th>D-MID</th>
      <th>G-MID</th>
      <th>P-MID</th>
      <th>S-MID</th>
      <th>D-SD</th>
      <th>G-SD</th>
      <th>P-SD</th>
      <th>S-SD</th>
      <th>D-MOD</th>
      <th>G-MOD</th>
      <th>P-MOD</th>
      <th>S-MOD</th>
      <th>RANK</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>0.503937</td>
      <td>1.0</td>
      <td>0.198614</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.500042</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>0.503937</td>
      <td>1.0</td>
      <td>0.060046</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.500042</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>2</th>
      <td>0.503937</td>
      <td>1.0</td>
      <td>0.337182</td>
      <td>0.503959</td>
      <td>0.0</td>
      <td>0.648399</td>
      <td>0.0</td>
      <td>0.503937</td>
      <td>0.0</td>
      <td>0.648429</td>
      <td>0.0</td>
      <td>0.151537</td>
      <td>0.0</td>
      <td>0.083406</td>
      <td>0.0</td>
      <td>0.503937</td>
      <td>0.0</td>
      <td>0.648429</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>3</th>
      <td>0.503937</td>
      <td>1.0</td>
      <td>0.060046</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.500042</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
    <tr>
      <th>4</th>
      <td>0.503937</td>
      <td>1.0</td>
      <td>0.060046</td>
      <td>0.421914</td>
      <td>0.0</td>
      <td>0.500042</td>
      <td>0.0</td>
      <td>0.433071</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.283683</td>
      <td>0.0</td>
      <td>0.000000</td>
      <td>0.0</td>
      <td>0.433071</td>
      <td>0.0</td>
      <td>0.499785</td>
      <td>0.0</td>
      <td>0.0</td>
    </tr>
  </tbody>
</table>
</div>



<h3 id="Starting-observe-data"><a href="#Starting-observe-data" class="headerlink" title="Starting observe data"></a>Starting observe data</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># prepare for evaluation tool</span></span><br><span class="line"><span class="keyword">import</span> seaborn <span class="keyword">as</span> sns</span><br><span class="line"><span class="keyword">import</span> matplotlib.pyplot <span class="keyword">as</span> plt</span><br><span class="line"><span class="keyword">import</span> matplotlib.gridspec <span class="keyword">as</span> gridspec</span><br><span class="line"><span class="keyword">from</span> scipy.spatial <span class="keyword">import</span> Voronoi, voronoi_plot_2d</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">noiser</span>(<span class="params">df</span>):</span><br><span class="line">    <span class="keyword">return</span> df.applymap(<span class="keyword">lambda</span> x : x+np.random.random()*<span class="number">0.001</span>)</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">distributionPlot</span>(<span class="params">columnName0, columnName1, hueColumn, dataDfNormalized</span>):</span><br><span class="line">    <span class="comment"># getting data</span></span><br><span class="line">    dataPoints = dataDfNormalized[[columnName0, columnName1]]</span><br><span class="line"></span><br><span class="line">    <span class="comment"># adding noise</span></span><br><span class="line">    dataPointsWithNoise = noiser(dataDfNormalized)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># plot the overview of the data</span></span><br><span class="line">    fig, ax = plt.subplots(<span class="number">1</span>, sharey=<span class="literal">True</span>)</span><br><span class="line">    sns.scatterplot(x = columnName0 ,y = columnName1, data = dataPointsWithNoise, hue=hueColumn, marker = <span class="string">&quot;o&quot;</span>, ax=ax)</span><br><span class="line">    plt.xlim([-<span class="number">0.01</span>,<span class="number">1.01</span>]), plt.ylim([-<span class="number">0.01</span>,<span class="number">1.01</span>])</span><br><span class="line"></span><br><span class="line">    <span class="string">&quot;&quot;&quot;</span></span><br><span class="line"><span class="string">    https://stackoverflow.com/questions/20515554/colorize-voronoi-diagram/20678647#20678647</span></span><br><span class="line"><span class="string">    https://ipython-books.github.io/145-computing-the-voronoi-diagram-of-a-set-of-points/</span></span><br><span class="line"><span class="string">    &quot;&quot;&quot;</span></span><br><span class="line">    <span class="comment"># add 4 distant dummy points to fix coloring problem</span></span><br><span class="line">    dataPoints = np.append((dataDfNormalized)[[<span class="string">&#x27;P-MEAN&#x27;</span>, <span class="string">&#x27;RANK&#x27;</span>]], [[<span class="number">2</span>,<span class="number">2</span>], [-<span class="number">2</span>,<span class="number">2</span>], [<span class="number">2</span>,-<span class="number">2</span>], [-<span class="number">2</span>,-<span class="number">2</span>]], axis = <span class="number">0</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># plot Voronoi diagrame</span></span><br><span class="line">    <span class="comment">## since it the function in scipy return a figure rather an ax, </span></span><br><span class="line">    <span class="comment">## we can not plot both figure in the same figure by normal way, </span></span><br><span class="line">    <span class="comment">## this can be improved later </span></span><br><span class="line">    vor = Voronoi(dataPoints)</span><br><span class="line">    voronoi_plot_2d(vor, show_vertices = <span class="literal">True</span>, point_size = <span class="number">0.5</span>)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># color list</span></span><br><span class="line">    colorList = []</span><br><span class="line">    <span class="keyword">for</span> regionIndex <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(vor.regions)):</span><br><span class="line">        <span class="keyword">if</span> <span class="keyword">not</span> -<span class="number">1</span> <span class="keyword">in</span> vor.regions[regionIndex]:</span><br><span class="line">            polygon = [vor.vertices[i] <span class="keyword">for</span> i <span class="keyword">in</span> vor.regions[regionIndex]]</span><br><span class="line">            <span class="keyword">if</span> <span class="built_in">len</span>(polygon) == <span class="number">0</span>:</span><br><span class="line">                colorList += colorList[-<span class="number">1</span>:]</span><br><span class="line">                <span class="keyword">continue</span></span><br><span class="line">            colorList += [np.array(polygon).transpose().<span class="built_in">min</span>()]</span><br><span class="line">        colorList += colorList[-<span class="number">1</span>:]</span><br><span class="line">    colorList = normalizer(np.array(colorList))</span><br><span class="line"></span><br><span class="line">    <span class="comment"># colorize by the distance from 0 point</span></span><br><span class="line">    <span class="keyword">for</span> regionIndex <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(vor.regions)):</span><br><span class="line">        <span class="keyword">if</span> <span class="keyword">not</span> -<span class="number">1</span> <span class="keyword">in</span> vor.regions[regionIndex]:</span><br><span class="line">            polygon = [vor.vertices[i] <span class="keyword">for</span> i <span class="keyword">in</span> vor.regions[regionIndex]]</span><br><span class="line">            plt.fill(*<span class="built_in">zip</span>(*polygon),color=np.repeat(colorList[regionIndex],<span class="number">3</span>))</span><br><span class="line"></span><br><span class="line">    <span class="comment"># fix the range of axes</span></span><br><span class="line">    plt.xlim([-<span class="number">0.2</span>,<span class="number">1.2</span>]), plt.ylim([-<span class="number">0.2</span>,<span class="number">1.2</span>])</span><br><span class="line">    plt.xlabel(columnName0)</span><br><span class="line">    plt.ylabel(columnName1)</span><br><span class="line"></span><br><span class="line">    plt.show()</span><br><span class="line"></span><br><span class="line"><span class="keyword">def</span> <span class="title function_">comparisionPlot</span>(<span class="params">columnName0, columnName1, dataDfNormalized</span>):</span><br><span class="line">    <span class="comment"># Plotting</span></span><br><span class="line">    fig = plt.figure(figsize=(<span class="number">12</span>,<span class="number">10</span>))</span><br><span class="line"></span><br><span class="line">    gs1 = gridspec.GridSpec(nrows=<span class="number">2</span>, ncols=<span class="number">2</span>)</span><br><span class="line">    ax1 = fig.add_subplot(gs1[:, <span class="number">0</span>])</span><br><span class="line">    ax2 = fig.add_subplot(gs1[<span class="number">0</span>, <span class="number">1</span>])</span><br><span class="line">    ax3 = fig.add_subplot(gs1[<span class="number">1</span>, <span class="number">1</span>])</span><br><span class="line"></span><br><span class="line">    dataPointsWithNoise = noiser(dataDfNormalized)</span><br><span class="line">    sns.scatterplot(x = columnName0 ,y = columnName1, data = dataPointsWithNoise, hue=<span class="string">&quot;RANK&quot;</span>, marker = <span class="string">&quot;o&quot;</span>, ax = ax1)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># noise half version high</span></span><br><span class="line">    dataPointsWithNoise = noiser(dataDfNormalized[dataDfNormalized[<span class="string">&quot;RANK&quot;</span>]&lt;<span class="number">0.5</span>])</span><br><span class="line">    sns.scatterplot(x = columnName0 ,y = columnName1, data = dataPointsWithNoise, hue=<span class="string">&quot;RANK&quot;</span>, marker = <span class="string">&quot;o&quot;</span>, ax = ax2)</span><br><span class="line"></span><br><span class="line">    <span class="comment"># noise half version low</span></span><br><span class="line">    dataPointsWithNoise = noiser(dataDfNormalized[dataDfNormalized[<span class="string">&quot;RANK&quot;</span>]&gt;<span class="number">0.5</span>])</span><br><span class="line">    sns.scatterplot(x = columnName0 ,y = columnName1, data = dataPointsWithNoise, hue=<span class="string">&quot;RANK&quot;</span>, marker = <span class="string">&quot;o&quot;</span>, ax = ax3)</span><br><span class="line"></span><br><span class="line">    ax1.set_xlim([<span class="number">0</span>,<span class="number">1.01</span>]), ax1.set_ylim([<span class="number">0</span>,<span class="number">1.01</span>])</span><br><span class="line">    ax2.set_xlim([<span class="number">0</span>,<span class="number">1.01</span>]), ax2.set_ylim([<span class="number">0</span>,<span class="number">1.01</span>])</span><br><span class="line">    ax3.set_xlim([<span class="number">0</span>,<span class="number">1.01</span>]), ax3.set_ylim([<span class="number">0</span>,<span class="number">1.01</span>])</span><br><span class="line"></span><br><span class="line">    ax1.set_title(<span class="string">&quot;Plot of &quot;</span> +columnName0+ <span class="string">&quot; v.s. &quot;</span> +columnName1)</span><br><span class="line">    ax2.set_title(<span class="string">&quot;Seperate Plot of Higher Rank Notes&quot;</span>)</span><br><span class="line">    ax3.set_title(<span class="string">&quot;Seperate Plot of Lower Rank Notes&quot;</span>)</span><br><span class="line"></span><br><span class="line">    plt.show()</span><br></pre></td></tr></table></figure>


<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">print</span>(<span class="built_in">len</span>(dataDfNormalized.columns))</span><br><span class="line">dataDfNormalized.columns</span><br></pre></td></tr></table></figure>

<pre><code>20





Index([&#39;VEL-SINGLE&#39;, &#39;OPE-SINGLE&#39;, &#39;DUR-SINGLE&#39;, &#39;D-MEAN&#39;, &#39;G-MEAN&#39;, &#39;P-MEAN&#39;,
       &#39;S-MEAN&#39;, &#39;D-MID&#39;, &#39;G-MID&#39;, &#39;P-MID&#39;, &#39;S-MID&#39;, &#39;D-SD&#39;, &#39;G-SD&#39;, &#39;P-SD&#39;,
       &#39;S-SD&#39;, &#39;D-MOD&#39;, &#39;G-MOD&#39;, &#39;P-MOD&#39;, &#39;S-MOD&#39;, &#39;RANK&#39;],
      dtype=&#39;object&#39;)
</code></pre>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># distributionPlot(&#x27;DUR-SINGLE&#x27;,&#x27;P-SD&#x27;,&quot;RANK&quot;,dataDfNormalized)</span></span><br><span class="line">comparisionPlot(<span class="string">&#x27;DUR-SINGLE&#x27;</span>,<span class="string">&#x27;P-SD&#x27;</span>,dataDfNormalized)</span><br></pre></td></tr></table></figure>


<p><img src= "/img/loading.gif" data-lazy-src="https://image.discover304.top/output_22_0.png"></p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">tempDf = dataDfNormalized[dataDfNormalized[<span class="string">&#x27;P-SD&#x27;</span>]!=<span class="number">0</span>]</span><br><span class="line">fig = plt.figure(figsize=(<span class="number">3</span>,<span class="number">4</span>))</span><br><span class="line">plt.bar([<span class="string">&quot;High rank&quot;</span>,<span class="string">&quot;Low rank&quot;</span>],[tempDf[tempDf[<span class="string">&#x27;RANK&#x27;</span>]&lt;<span class="number">0.5</span>][<span class="string">&#x27;P-SD&#x27;</span>].mean(), tempDf[tempDf[<span class="string">&#x27;RANK&#x27;</span>]&gt;<span class="number">0.5</span>][<span class="string">&#x27;P-SD&#x27;</span>].mean()])</span><br><span class="line">plt.ylabel(<span class="string">&quot;Mean P-SD&quot;</span>)</span><br><span class="line">plt.show()</span><br></pre></td></tr></table></figure>


<p><img src= "/img/loading.gif" data-lazy-src="https://image.discover304.top/output_23_0.png"></p>
<h4 id="Observation-1"><a href="#Observation-1" class="headerlink" title="Observation 1"></a>Observation 1</h4><ul>
<li>The better the performance of a note in competition, the wider the pitch distributed and this trend can be seen along all duration value.<ul>
<li>A better tuner is more likly to change the pitch.</li>
</ul>
</li>
</ul>
<h3 id="PCA"><a href="#PCA" class="headerlink" title="PCA"></a>PCA</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">dataDfNormalized.columns</span><br></pre></td></tr></table></figure>




<pre><code>Index([&#39;VEL-SINGLE&#39;, &#39;OPE-SINGLE&#39;, &#39;DUR-SINGLE&#39;, &#39;D-MEAN&#39;, &#39;G-MEAN&#39;, &#39;P-MEAN&#39;,
       &#39;S-MEAN&#39;, &#39;D-MID&#39;, &#39;G-MID&#39;, &#39;P-MID&#39;, &#39;S-MID&#39;, &#39;D-SD&#39;, &#39;G-SD&#39;, &#39;P-SD&#39;,
       &#39;S-SD&#39;, &#39;D-MOD&#39;, &#39;G-MOD&#39;, &#39;P-MOD&#39;, &#39;S-MOD&#39;, &#39;RANK&#39;],
      dtype=&#39;object&#39;)
</code></pre>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">from</span> sklearn.decomposition <span class="keyword">import</span> PCA</span><br><span class="line"></span><br><span class="line">pca = PCA(n_components=(<span class="built_in">len</span>(dataDfNormalized.columns[:-<span class="number">1</span>])))</span><br><span class="line">pca.fit(dataDfNormalized[dataDfNormalized.columns[:-<span class="number">1</span>]].values)</span><br><span class="line">pca_result = pca.transform(dataDfNormalized[dataDfNormalized.columns[:-<span class="number">1</span>]].values)</span><br><span class="line">sns.scatterplot(x=pca_result[:,<span class="number">0</span>], y=pca_result[:,<span class="number">1</span>], hue=dataDfNormalized[<span class="string">&quot;RANK&quot;</span>])</span><br><span class="line">plt.xlabel(<span class="string">&quot;PC1&quot;</span>), plt.ylabel(<span class="string">&quot;PC2&quot;</span>)</span><br><span class="line">plt.show()</span><br></pre></td></tr></table></figure>


<p><img src= "/img/loading.gif" data-lazy-src="https://image.discover304.top/output_27_0.png"></p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sns.pointplot(y = [np.<span class="built_in">sum</span>(pca.explained_variance_ratio_[:i]) <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">20</span>)], x = [i <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">20</span>)])</span><br><span class="line">plt.xlabel(<span class="string">&quot;PCs&quot;</span>), plt.ylabel(<span class="string">&quot;Explain&quot;</span>)</span><br><span class="line">plt.show()</span><br></pre></td></tr></table></figure>


<p><img src= "/img/loading.gif" data-lazy-src="https://image.discover304.top/output_28_0.png"></p>
<h3 id="linear-regression"><a href="#linear-regression" class="headerlink" title="linear regression"></a>linear regression</h3><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">import</span> statsmodels.formula.api <span class="keyword">as</span> smf</span><br><span class="line"></span><br><span class="line">pcs = dataDfNormalized[[<span class="string">&quot;RANK&quot;</span>]].join(pd.DataFrame(&#123;<span class="string">&quot;PC1&quot;</span>:pca_result[:,<span class="number">0</span>]&#125;),on=dataDfNormalized.index)</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">1</span>,<span class="number">9</span>): <span class="comment"># we take first 8 value</span></span><br><span class="line">    pcs = pcs.join(pd.DataFrame(&#123;<span class="string">&quot;PC&quot;</span>+<span class="built_in">str</span>(i+<span class="number">1</span>):pca_result[:,i]&#125;),on=dataDfNormalized.index)</span><br><span class="line"></span><br><span class="line">model = smf.ols(<span class="string">&#x27;RANK ~ PC1 + PC2  + PC3 + PC4&#x27;</span>, data=pcs)</span><br><span class="line">result = model.fit()</span><br><span class="line"></span><br><span class="line">result.summary()</span><br></pre></td></tr></table></figure>




<table class="simpletable">
<caption>OLS Regression Results</caption>
<tr>
  <th>Dep. Variable:</th>          <td>RANK</td>       <th>  R-squared:         </th> <td>   0.131</td>
</tr>
<tr>
  <th>Model:</th>                   <td>OLS</td>       <th>  Adj. R-squared:    </th> <td>   0.130</td>
</tr>
<tr>
  <th>Method:</th>             <td>Least Squares</td>  <th>  F-statistic:       </th> <td>   106.3</td>
</tr>
<tr>
  <th>Date:</th>             <td>Mon, 11 Jan 2021</td> <th>  Prob (F-statistic):</th> <td>1.68e-84</td>
</tr>
<tr>
  <th>Time:</th>                 <td>21:21:21</td>     <th>  Log-Likelihood:    </th> <td>  71.223</td>
</tr>
<tr>
  <th>No. Observations:</th>      <td>  2832</td>      <th>  AIC:               </th> <td>  -132.4</td>
</tr>
<tr>
  <th>Df Residuals:</th>          <td>  2827</td>      <th>  BIC:               </th> <td>  -102.7</td>
</tr>
<tr>
  <th>Df Model:</th>              <td>     4</td>      <th>                     </th>     <td> </td>   
</tr>
<tr>
  <th>Covariance Type:</th>      <td>nonrobust</td>    <th>                     </th>     <td> </td>   
</tr>
</table>
<table class="simpletable">
<tr>
      <td></td>         <th>coef</th>     <th>std err</th>      <th>t</th>      <th>P>|t|</th>  <th>[0.025</th>    <th>0.975]</th>  
</tr>
<tr>
  <th>Intercept</th> <td>    0.5392</td> <td>    0.004</td> <td>  121.492</td> <td> 0.000</td> <td>    0.530</td> <td>    0.548</td>
</tr>
<tr>
  <th>PC1</th>       <td>   -0.3301</td> <td>    0.018</td> <td>  -18.183</td> <td> 0.000</td> <td>   -0.366</td> <td>   -0.295</td>
</tr>
<tr>
  <th>PC2</th>       <td>    0.1395</td> <td>    0.020</td> <td>    6.862</td> <td> 0.000</td> <td>    0.100</td> <td>    0.179</td>
</tr>
<tr>
  <th>PC3</th>       <td>   -0.1090</td> <td>    0.027</td> <td>   -4.036</td> <td> 0.000</td> <td>   -0.162</td> <td>   -0.056</td>
</tr>
<tr>
  <th>PC4</th>       <td>   -0.1681</td> <td>    0.030</td> <td>   -5.599</td> <td> 0.000</td> <td>   -0.227</td> <td>   -0.109</td>
</tr>
</table>
<table class="simpletable">
<tr>
  <th>Omnibus:</th>       <td>28.744</td> <th>  Durbin-Watson:     </th> <td>   0.186</td>
</tr>
<tr>
  <th>Prob(Omnibus):</th> <td> 0.000</td> <th>  Jarque-Bera (JB):  </th> <td>  19.880</td>
</tr>
<tr>
  <th>Skew:</th>          <td>-0.076</td> <th>  Prob(JB):          </th> <td>4.82e-05</td>
</tr>
<tr>
  <th>Kurtosis:</th>      <td> 2.619</td> <th>  Cond. No.          </th> <td>    6.77</td>
</tr>
</table><br/><br/>Notes:<br/>[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.




<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pcs = pcs.join(pd.DataFrame(&#123;<span class="string">&quot;RANK-PREDICT&quot;</span>:result.fittedvalues&#125;), on=pcs.index)</span><br></pre></td></tr></table></figure>


<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># the square error</span></span><br><span class="line">np.<span class="built_in">sum</span>(np.power(pcs[<span class="string">&quot;RANK&quot;</span>]-pcs[<span class="string">&quot;RANK-PREDICT&quot;</span>],<span class="number">2</span>))</span><br></pre></td></tr></table></figure>




<pre><code>157.6792358196176
</code></pre>
<h2 id="Visualise-our-regression-result"><a href="#Visualise-our-regression-result" class="headerlink" title="Visualise our regression result"></a>Visualise our regression result</h2><figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">fig = plt.figure(figsize=(<span class="number">10</span>,<span class="number">10</span>))</span><br><span class="line">sns.scatterplot(x=<span class="string">&quot;PC1&quot;</span>, y=<span class="string">&quot;RANK&quot;</span>, data=pcs, marker=<span class="string">&quot;o&quot;</span>)</span><br><span class="line">sns.scatterplot(x=<span class="string">&quot;PC1&quot;</span>, y=<span class="string">&quot;RANK-PREDICT&quot;</span>, data=pcs, hue=np.<span class="built_in">abs</span>(pcs[<span class="string">&quot;RANK&quot;</span>]-pcs[<span class="string">&quot;RANK-PREDICT&quot;</span>]), marker=<span class="string">&quot;o&quot;</span>)</span><br><span class="line"></span><br><span class="line">plt.show()</span><br></pre></td></tr></table></figure>


<p><img src= "/img/loading.gif" data-lazy-src="https://image.discover304.top/output_34_0.png"></p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line">fig = plt.figure(figsize=(<span class="number">10</span>,<span class="number">10</span>))</span><br><span class="line">ax = plt.subplot(<span class="number">111</span>, projection=<span class="string">&quot;3d&quot;</span>)</span><br><span class="line">ax.scatter(pcs.PC1, pcs.PC2, pcs.RANK, c=pcs.RANK)</span><br><span class="line"><span class="comment"># ax.scatter(pcs.PC1, pcs.PC2, pcs[[&quot;RANK-PREDICT&quot;]], c=np.abs(pcs[&quot;RANK&quot;]-pcs[&quot;RANK-PREDICT&quot;]), marker=&quot;x&quot;)</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># pcssample = pcs.sample(10).sort_values(by=&quot;RANK&quot;)</span></span><br><span class="line"><span class="comment"># ax.plot_surface(pcssample.PC1, pcssample.PC2, pcssample[[&quot;RANK-PREDICT&quot;]], rstride=1, cstride=1, cmap=&#x27;rainbow&#x27;)</span></span><br><span class="line"></span><br><span class="line">ax.set_xlabel(<span class="string">&quot;PC1&quot;</span>)</span><br><span class="line">ax.set_ylabel(<span class="string">&quot;PC2&quot;</span>)</span><br><span class="line">ax.set_zlabel(<span class="string">&quot;RANK&quot;</span>)</span><br><span class="line"></span><br><span class="line">ax.view_init(<span class="number">20</span>,<span class="number">10</span>)</span><br><span class="line"></span><br><span class="line">plt.show()</span><br></pre></td></tr></table></figure>


<p><img src= "/img/loading.gif" data-lazy-src="https://image.discover304.top/output_35_0.png"></p>
<h2 id="Conclusion"><a href="#Conclusion" class="headerlink" title="Conclusion"></a>Conclusion</h2><p>There is a really low value of $R^2$, less than 0.2, means the regression equation is not good enough to predict the Rank of a note from the properties we extracted from the 960 length vector. That might because of wrong choices of property, so, more research should be taken to varify the result we get in this notebook.</p>
<p>Next we can try to use the trend of a note to get a regression equation of it.</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">Author: </span><span class="post-copyright-info"><a href="mailto:hobart.yang@qq.com">✨YangSier✨</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">Link: </span><span class="post-copyright-info"><a href="https://discover304.top/2021/01/14/2021q1/023-AI-tuner-feasibility-test/">https://discover304.top/2021/01/14/2021q1/023-AI-tuner-feasibility-test/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">Copyright Notice: </span><span class="post-copyright-info">All articles in this blog are licensed under <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0anime</a> unless stating additionally.</span></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/%E8%AE%B0%E5%BD%95/">记录</a><a class="post-meta__tags" href="/tags/Python/">Python</a><a class="post-meta__tags" href="/tags/%E6%95%B4%E7%90%86/">整理</a></div><div class="post_share"><div class="social-share" data-image="https://th.bing.com/th/id/R28765e26714f5153026a15b67cb6fcf0?rik=SOYcApIlPZfQFg&amp;riu=http%3a%2f%2fi2.hdslb.com%2fbfs%2farchive%2f6eedb4d5814e27b8bd9c202c93eb7479b59de9a4.jpg&amp;ehk=PjnR2Od1wLaa4JrXwF2G5bhtjyacieFcSC5ux4nWb8s%3d&amp;risl=&amp;pid=ImgRaw" data-sites="facebook,twitter,wechat,weibo,qzone,qq,linkedin"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/social-share.js/dist/js/social-share.min.js" defer></script></div></div><div class="post-reward"><div class="reward-button"><i class="fas fa-qrcode"></i> Donate<div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="/img/wechat.jpg" target="_blank"><img class="post-qr-code-img" data-lazy-src="/img/wechat.jpg" alt="wechat"/></a><div class="post-qr-code-desc">wechat</div></li><li class="reward-item"><a href="/img/alipay.jpg" target="_blank"><img class="post-qr-code-img" data-lazy-src="/img/alipay.jpg" alt="alipay"/></a><div class="post-qr-code-desc">alipay</div></li></ul></div></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2021/01/25/2021q1/024-dynamic-programming/"><img class="prev-cover" data-lazy-src="https://image.discover304.top/blog-img/s09194709192022.png" onerror="onerror=null;src='/img/404.png'" alt="cover of previous post"><div class="pagination-info"><div class="label">Previous Post</div><div class="prev_info">Tabulation v.s. Recursion With Memory (Dynamic Programming)</div></div></a></div><div class="next-post pull-right"><a href="/2021/01/13/2021q1/022-agile-vs-waterfall/"><img class="next-cover" data-lazy-src="https://www.bounteous.com/sites/default/files/infield-migrate/agile-waterfall-960x576-300x180.png" onerror="onerror=null;src='/img/404.png'" alt="cover of next post"><div class="pagination-info"><div class="label">Next Post</div><div class="next_info">Agile v.s. Waterfall</div></div></a></div></nav><div class="relatedPosts"><div class="headline"><i class="fas fa-thumbs-up fa-fw"></i><span> Related Articles</span></div><div class="relatedPosts-list"><div><a href="/2021/08/02/2021q3/039-python-爬虫/" title="【Python】爬虫"><img class="cover" data-lazy-src="https://www.abuyun.com/misc/inline-images/1_27.png" alt="cover"><div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i> 2021-12-25</div><div class="title">【Python】爬虫</div></div></a></div><div><a href="/2021/08/31/2021q3/041-python-note/" title="【Python】人工智能入门须知"><img class="cover" data-lazy-src="https://thumbs.dreamstime.com/z/ai-artificial-intelligence-programming-languages-type-message-sticky-note-computer-keyboard-ai-artificial-intelligence-187103540.jpg" alt="cover"><div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i> 2021-12-25</div><div class="title">【Python】人工智能入门须知</div></div></a></div><div><a href="/2021/09/01/2021q3/042-python-note/" title="【Python】第一部分：第一段代码"><img class="cover" data-lazy-src="https://image.discover304.top/python900-500.jpg?imageView2/2/h/300" alt="cover"><div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i> 2022-01-07</div><div class="title">【Python】第一部分：第一段代码</div></div></a></div><div><a href="/2021/09/03/2021q3/043-python-note/" title="【Python】从基础变量类型到各种容器（列表、字典、元组、集合、字符串）"><img class="cover" data-lazy-src="https://image.discover304.top/python900-500.jpg?imageView2/2/h/300" alt="cover"><div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i> 2022-01-06</div><div class="title">【Python】从基础变量类型到各种容器（列表、字典、元组、集合、字符串）</div></div></a></div><div><a href="/2021/09/08/2021q3/048-pyhton-note/" title="【Python】笔记第三部分：函数"><img class="cover" data-lazy-src="https://image.discover304.top/python900-500.jpg?imageView2/2/h/300" alt="cover"><div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i> 2022-01-07</div><div class="title">【Python】笔记第三部分：函数</div></div></a></div><div><a href="/2021/09/13/2021q3/056-1-python-note/" title="【Python】笔记第四部分下：黑盒子的三大特征"><img class="cover" data-lazy-src="https://image.discover304.top/python900-500.jpg?imageView2/2/h/300" alt="cover"><div class="content is-center"><div class="date"><i class="fas fa-history fa-fw"></i> 2022-01-08</div><div class="title">【Python】笔记第四部分下：黑盒子的三大特征</div></div></a></div></div></div><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> Comment</span></div></div><div class="comment-wrap"><div><div class="vcomment" id="vcomment"></div></div></div></div></div><div class="aside_content" id="aside_content"><div class="card-widget card-info"><div class="card-content"><div class="card-info-avatar is-center"><img class="avatar-img" data-lazy-src="/img/head.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">✨YangSier✨</div><div class="author-info__description">Love Everything You Like.</div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">Articles</div><div class="length-num">243</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">Tags</div><div class="length-num">88</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">Categories</div><div class="length-num">23</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://space.bilibili.com/98639326"><i class="fab fa-bilibili"></i><span>Bilibili Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/Discover304" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="https://blog.csdn.net/Discover304" target="_blank" title="CSDN"><i class="fa-solid fa-c"></i></a><a class="social-icon" href="https://www.zhihu.com/people/discover-56-86-75" target="_blank" title="知乎"><i class="fa-brands fa-zhihu"></i></a><a class="social-icon" href="mailto:hobart.yang@qq.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a><a class="social-icon" href="https://jq.qq.com/?_wv=1027&amp;k=EaGddTQg" target="_blank" title="QQ"><i class="fa-brands fa-qq"></i></a></div></div></div><div class="card-widget card-announcement"><div class="card-content"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>Announcement</span></div><div class="announcement_content">✨动态更新：<p style="text-align:center">享受精彩大学生活中。</p>✨聊天划水QQ群：<p style="text-align:center"><a target="_blank" rel="noopener" href="https://jq.qq.com/?_wv=1027&k=EaGddTQg"><strong>兔叽の魔术工房</strong></a><br>942-848-525</p>✨我们的口号是：<p style="text-align:center; color:#39C5BB">人工降神，机械飞升！</p><a target="_blank" rel="noopener" href='https://space.bilibili.com/98639326'><img src='/img/mikulittletrans.png'></a></div></div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="card-content"><div class="item-headline"><i class="fas fa-stream"></i><span>Catalog</span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#Prepare-dataset"><span class="toc-text">Prepare dataset</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Formating-data-before-evaluation"><span class="toc-text">Formating data before evaluation</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Clean-our-data"><span class="toc-text">Clean our data</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Observe-data"><span class="toc-text">Observe data</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#Normalisation-and-Standardization"><span class="toc-text">Normalisation and Standardization</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#Starting-observe-data"><span class="toc-text">Starting observe data</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#Observation-1"><span class="toc-text">Observation 1</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#PCA"><span class="toc-text">PCA</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#linear-regression"><span class="toc-text">linear regression</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Visualise-our-regression-result"><span class="toc-text">Visualise our regression result</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Conclusion"><span class="toc-text">Conclusion</span></a></li></ol></div></div></div><div class="card-widget card-recent-post"><div class="card-content"><div class="item-headline"><i class="fas fa-history"></i><span>Recent Post</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2023/04/24/2023q1/173-nginx-docker-blog-page-depoly/" title="【模板】Hexo Docker Nginx 个人博客服务器部署"><img data-lazy-src="https://image.discover304.top/s16001804242023.png?imageView2/2/h/300" onerror="this.onerror=null;this.src='/img/404.png'" alt="【模板】Hexo Docker Nginx 个人博客服务器部署"/></a><div class="content"><a class="title" href="/2023/04/24/2023q1/173-nginx-docker-blog-page-depoly/" title="【模板】Hexo Docker Nginx 个人博客服务器部署">【模板】Hexo Docker Nginx 个人博客服务器部署</a><time datetime="2023-04-24T06:39:24.000Z" title="Created 2023-04-24 14:39:24">2023-04-24</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/12/11/2022q4/172-design-idea/" title="【思考】创新点子"><img data-lazy-src="https://image.discover304.top/blog-img/s19313212112022.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="【思考】创新点子"/></a><div class="content"><a class="title" href="/2022/12/11/2022q4/172-design-idea/" title="【思考】创新点子">【思考】创新点子</a><time datetime="2022-12-11T11:08:37.000Z" title="Created 2022-12-11 19:08:37">2022-12-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/12/11/2022q4/171-other-thought/" title="【思考】其他思考"><img data-lazy-src="https://image.discover304.top/blog-img/s19305112112022.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="【思考】其他思考"/></a><div class="content"><a class="title" href="/2022/12/11/2022q4/171-other-thought/" title="【思考】其他思考">【思考】其他思考</a><time datetime="2022-12-11T11:08:17.000Z" title="Created 2022-12-11 19:08:17">2022-12-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/12/11/2022q4/170-key-thought/" title="【思考】核心思考"><img data-lazy-src="https://image.discover304.top/blog-img/s19294112112022.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="【思考】核心思考"/></a><div class="content"><a class="title" href="/2022/12/11/2022q4/170-key-thought/" title="【思考】核心思考">【思考】核心思考</a><time datetime="2022-12-11T11:08:06.000Z" title="Created 2022-12-11 19:08:06">2022-12-11</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/12/09/2022q4/169-new-r/" title="R: Getting Into Project of R"><img data-lazy-src="https://image.discover304.top/blog-img/s18350812112022.png" onerror="this.onerror=null;this.src='/img/404.png'" alt="R: Getting Into Project of R"/></a><div class="content"><a class="title" href="/2022/12/09/2022q4/169-new-r/" title="R: Getting Into Project of R">R: Getting Into Project of R</a><time datetime="2022-12-09T09:44:06.000Z" title="Created 2022-12-09 17:44:06">2022-12-09</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/11/28/2022q3/167-2-sp-review/" title="SP Modules Review Contents (3)"><img data-lazy-src="https://image.discover304.top/blog-img/s11220010012022.png?imageView2/2/h/300" onerror="this.onerror=null;this.src='/img/404.png'" alt="SP Modules Review Contents (3)"/></a><div class="content"><a class="title" href="/2022/11/28/2022q3/167-2-sp-review/" title="SP Modules Review Contents (3)">SP Modules Review Contents (3)</a><time datetime="2022-11-28T07:24:39.000Z" title="Created 2022-11-28 15:24:39">2022-11-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2022/11/17/2022q3/166-10-connected-speech-hidden-markov-model/" title="SP Module 10 Connected Speech &amp; HMM Training"><img data-lazy-src="https://image.discover304.top/blog-img/s11220010012022.png?imageView2/2/h/300" onerror="this.onerror=null;this.src='/img/404.png'" alt="SP Module 10 Connected Speech &amp; HMM Training"/></a><div class="content"><a class="title" href="/2022/11/17/2022q3/166-10-connected-speech-hidden-markov-model/" title="SP Module 10 Connected Speech &amp; HMM Training">SP Module 10 Connected Speech &amp; HMM Training</a><time datetime="2022-11-17T01:47:12.000Z" title="Created 2022-11-17 09:47:12">2022-11-17</time></div></div></div></div></div></div></div></main><footer id="footer" style="background-image: url(https://th.bing.com/th/id/R28765e26714f5153026a15b67cb6fcf0?rik=SOYcApIlPZfQFg&amp;riu=http%3a%2f%2fi2.hdslb.com%2fbfs%2farchive%2f6eedb4d5814e27b8bd9c202c93eb7479b59de9a4.jpg&amp;ehk=PjnR2Od1wLaa4JrXwF2G5bhtjyacieFcSC5ux4nWb8s%3d&amp;risl=&amp;pid=ImgRaw)"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By ✨YangSier✨</div><div><a target="_blank" href="https://beian.miit.gov.cn/" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;"> 冀ICP备2021025381号-1</p></a></div><div><a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=13060602001430" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="/img/beian.png" style="float:left;"/><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">冀公网安备 13060602001430号</p></a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="Read Mode"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="Switch Between Traditional Chinese And Simplified Chinese">繁</button><button id="darkmode" type="button" title="Switch Between Light And Dark Mode"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="Toggle between single-column and double-column"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="Setting"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="Table Of Contents"><i class="fas fa-list-ul"></i></button><a id="to_comment" href="#post-comment" title="Scroll To Comments"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="Back To Top"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">Local search</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="Search for Posts" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.spacingElementById('content-inner')
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.spacingElementById('content-inner')
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><script src="/js/search/local-search.js"></script><script>var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',()=> {preloader.endLoading()})</script><div class="js-pjax"><script>if (document.getElementsByClassName('mermaid').length) {
  if (window.mermaidJsLoad) mermaid.init()
  else {
    getScript('https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js').then(() => {
      window.mermaidJsLoad = true
      mermaid.initialize({
        theme: 'neutral',
      })
      false && mermaid.init()
    })
  }
}</script><script>function loadValine () {
  function initValine () {
    let initData = {
      el: '#vcomment',
      appId: 'A9RWVELPcIotgfbpp9KLGXQM-gzGzoHsz',
      appKey: 'MLgPQW5h0DPgE8jNkeREKubU',
      placeholder: '欢迎留言呀。（网址是选填，可以留空）',
      avatar: 'monsterid',
      meta: 'nick,mail,link'.split(','),
      pageSize: '10',
      lang: 'zh-CN',
      recordIP: true,
      serverURLs: 'https://a9rwvelp.lc-cn-n1-shared.com',
      emojiCDN: 'https://cdn.jsdelivr.net/gh/GamerNoTitle/ValineCDN@master/',
      emojiMaps: {"QQ1":"QQ/aini.gif","QQ2":"QQ/aixin.gif","QQ3":"QQ/aoman.gif","QQ4":"QQ/baiyan.gif","QQ5":"QQ/bangbangtang.gif","QQ6":"QQ/baojin.gif","QQ7":"QQ/baoquan.gif","QQ8":"QQ/bishi.gif","QQ9":"QQ/bizui.gif","QQ11":"QQ/cahan.gif","QQ12":"QQ/caidao.gif","QQ13":"QQ/chi.gif","QQ14":"QQ/ciya.gif","QQ15":"QQ/dabing.gif","QQ16":"QQ/daku.gif","QQ17":"QQ/dan.gif","QQ18":"QQ/deyi.gif","QQ19":"QQ/doge.gif","QQ20":"QQ/fadai.gif","QQ21":"QQ/fanu.gif","QQ22":"QQ/fendou.gif","QQ23":"QQ/ganga.gif","QQ24":"QQ/gouyin.gif","QQ25":"QQ/guzhang.gif","QQ26":"QQ/haixiu.gif","QQ27":"QQ/hanxiao.gif","QQ28":"QQ/haobang.gif","QQ29":"QQ/haqian.gif","QQ30":"QQ/hecai.gif","QQ31":"QQ/hexie.gif","QQ32":"QQ/huaixiao.gif","QQ33":"QQ/jie.gif","QQ34":"QQ/jingkong.gif","QQ35":"QQ/jingxi.gif","QQ36":"QQ/jingya.gif","QQ37":"QQ/juhua.gif","QQ38":"QQ/keai.gif","QQ39":"QQ/kelian.gif","QQ40":"QQ/koubi.gif","QQ41":"QQ/ku.gif","QQ42":"QQ/kuaikule.gif","QQ43":"QQ/kulou.gif","QQ44":"QQ/kun.gif","QQ45":"QQ/lanqiu.gif","QQ46":"QQ/leiben.gif","QQ47":"QQ/lenghan.gif","QQ48":"QQ/liuhan.gif","QQ49":"QQ/liulei.gif","QQ50":"QQ/nanguo.gif","QQ51":"QQ/OK.gif","QQ52":"QQ/penxue.gif","QQ53":"QQ/piezui.gif","QQ54":"QQ/pijiu.gif","QQ55":"QQ/qiang.gif","QQ56":"QQ/qiaoda.gif","QQ57":"QQ/qinqin.gif","QQ58":"QQ/qiudale.gif","QQ59":"QQ/quantou.gif","QQ60":"QQ/saorao.gif","QQ61":"QQ/se.gif","QQ62":"QQ/shengli.gif","QQ63":"QQ/shouqiang.gif","QQ64":"QQ/shuai.gif","QQ65":"QQ/shui.gif","QQ66":"QQ/tiaopi.gif","QQ67":"QQ/touxiao.gif","QQ68":"QQ/tu.gif","QQ69":"QQ/tuosai.gif","QQ70":"QQ/weiqu.gif","QQ71":"QQ/weixiao.gif","QQ72":"QQ/woshou.gif","QQ73":"QQ/wozuimei.gif","QQ74":"QQ/wunai.gif","QQ75":"QQ/xia.gif","QQ76":"QQ/xiaojiujie.gif","QQ77":"QQ/xiaoku.gif","QQ78":"QQ/xiaoyanger.gif","QQ79":"QQ/xieyanxiao.gif","QQ80":"QQ/xigua.gif","QQ81":"QQ/xu.gif","QQ82":"QQ/yangtuo.gif","QQ83":"QQ/yinxian.gif","QQ84":"QQ/yiwen.gif","QQ85":"QQ/youhengheng.gif","QQ86":"QQ/youling.gif","QQ87":"QQ/yun.gif","QQ88":"QQ/zaijian.gif","QQ89":"QQ/zhayanjian.gif","QQ90":"QQ/zhemo.gif","QQ91":"QQ/zhouma.gif","QQ92":"QQ/zhuakuang.gif","QQ93":"QQ/zuohengheng.gif","bilibiliHotKey1":"bilibiliHotKey/1.jpg","bilibiliHotKey2":"bilibiliHotKey/10.jpg","bilibiliHotKey3":"bilibiliHotKey/11.jpg","bilibiliHotKey4":"bilibiliHotKey/12.jpg","bilibiliHotKey5":"bilibiliHotKey/13.jpg","bilibiliHotKey6":"bilibiliHotKey/14.jpg","bilibiliHotKey7":"bilibiliHotKey/15.jpg","bilibiliHotKey8":"bilibiliHotKey/16.jpg","bilibiliHotKey9":"bilibiliHotKey/17.jpg","bilibiliHotKey10":"bilibiliHotKey/18.jpg","bilibiliHotKey11":"bilibiliHotKey/19.jpg","bilibiliHotKey12":"bilibiliHotKey/2.jpg","bilibiliHotKey13":"bilibiliHotKey/20.jpg","bilibiliHotKey14":"bilibiliHotKey/21.jpg","bilibiliHotKey15":"bilibiliHotKey/22.jpg","bilibiliHotKey16":"bilibiliHotKey/23.jpg","bilibiliHotKey17":"bilibiliHotKey/24.jpg","bilibiliHotKey18":"bilibiliHotKey/25.jpg","bilibiliHotKey19":"bilibiliHotKey/26.jpg","bilibiliHotKey20":"bilibiliHotKey/27.jpg","bilibiliHotKey21":"bilibiliHotKey/28.jpg","bilibiliHotKey22":"bilibiliHotKey/29.jpg","bilibiliHotKey23":"bilibiliHotKey/3.jpg","bilibiliHotKey24":"bilibiliHotKey/30.jpg","bilibiliHotKey25":"bilibiliHotKey/31.jpg","bilibiliHotKey26":"bilibiliHotKey/32.jpg","bilibiliHotKey27":"bilibiliHotKey/4.jpg","bilibiliHotKey28":"bilibiliHotKey/5.jpg","bilibiliHotKey29":"bilibiliHotKey/6.jpg","bilibiliHotKey30":"bilibiliHotKey/7.jpg","bilibiliHotKey31":"bilibiliHotKey/8.jpg","bilibiliHotKey32":"bilibiliHotKey/9.jpg","Menhera-chan1":"Menhera-chan/1.jpg","Menhera-chan2":"Menhera-chan/10.jpg","Menhera-chan3":"Menhera-chan/100.jpg","Menhera-chan4":"Menhera-chan/101.jpg","Menhera-chan5":"Menhera-chan/102.jpg","Menhera-chan6":"Menhera-chan/103.jpg","Menhera-chan7":"Menhera-chan/104.jpg","Menhera-chan8":"Menhera-chan/105.jpg","Menhera-chan9":"Menhera-chan/106.jpg","Menhera-chan10":"Menhera-chan/107.jpg","Menhera-chan11":"Menhera-chan/108.jpg","Menhera-chan12":"Menhera-chan/109.jpg","Menhera-chan13":"Menhera-chan/11.jpg","Menhera-chan14":"Menhera-chan/110.jpg","Menhera-chan15":"Menhera-chan/111.jpg","Menhera-chan16":"Menhera-chan/112.jpg","Menhera-chan17":"Menhera-chan/113.jpg","Menhera-chan18":"Menhera-chan/114.jpg","Menhera-chan19":"Menhera-chan/115.jpg","Menhera-chan20":"Menhera-chan/116.jpg","Menhera-chan21":"Menhera-chan/117.jpg","Menhera-chan22":"Menhera-chan/118.jpg","Menhera-chan23":"Menhera-chan/119.jpg","Menhera-chan24":"Menhera-chan/12.jpg","Menhera-chan25":"Menhera-chan/120.jpg","Menhera-chan26":"Menhera-chan/13.jpg","Menhera-chan27":"Menhera-chan/14.jpg","Menhera-chan28":"Menhera-chan/15.jpg","Menhera-chan29":"Menhera-chan/16.jpg","Menhera-chan30":"Menhera-chan/17.jpg","Menhera-chan31":"Menhera-chan/18.jpg","Menhera-chan32":"Menhera-chan/19.jpg","Menhera-chan33":"Menhera-chan/2.jpg","Menhera-chan34":"Menhera-chan/20.jpg","Menhera-chan35":"Menhera-chan/21.jpg","Menhera-chan36":"Menhera-chan/22.jpg","Menhera-chan37":"Menhera-chan/23.jpg","Menhera-chan38":"Menhera-chan/24.jpg","Menhera-chan39":"Menhera-chan/25.jpg","Menhera-chan40":"Menhera-chan/26.jpg","Menhera-chan41":"Menhera-chan/27.jpg","Menhera-chan42":"Menhera-chan/28.jpg","Menhera-chan43":"Menhera-chan/29.jpg","Menhera-chan44":"Menhera-chan/3.jpg","Menhera-chan45":"Menhera-chan/30.jpg","Menhera-chan46":"Menhera-chan/31.jpg","Menhera-chan47":"Menhera-chan/32.jpg","Menhera-chan48":"Menhera-chan/33.jpg","Menhera-chan49":"Menhera-chan/34.jpg","Menhera-chan50":"Menhera-chan/35.jpg","Menhera-chan51":"Menhera-chan/36.jpg","Menhera-chan52":"Menhera-chan/37.jpg","Menhera-chan53":"Menhera-chan/38.jpg","Menhera-chan54":"Menhera-chan/39.jpg","Menhera-chan55":"Menhera-chan/4.jpg","Menhera-chan56":"Menhera-chan/40.jpg","Menhera-chan57":"Menhera-chan/41.jpg","Menhera-chan58":"Menhera-chan/42.jpg","Menhera-chan59":"Menhera-chan/43.jpg","Menhera-chan60":"Menhera-chan/44.jpg","Menhera-chan61":"Menhera-chan/45.jpg","Menhera-chan62":"Menhera-chan/46.jpg","Menhera-chan63":"Menhera-chan/47.jpg","Menhera-chan64":"Menhera-chan/48.jpg","Menhera-chan65":"Menhera-chan/49.jpg","Menhera-chan66":"Menhera-chan/5.jpg","Menhera-chan67":"Menhera-chan/50.jpg","Menhera-chan68":"Menhera-chan/51.jpg","Menhera-chan69":"Menhera-chan/52.jpg","Menhera-chan70":"Menhera-chan/53(1).jpg","Menhera-chan71":"Menhera-chan/53.jpg","Menhera-chan72":"Menhera-chan/54.jpg","Menhera-chan73":"Menhera-chan/55.jpg","Menhera-chan74":"Menhera-chan/56.jpg","Menhera-chan75":"Menhera-chan/57.jpg","Menhera-chan76":"Menhera-chan/58.jpg","Menhera-chan77":"Menhera-chan/59.jpg","Menhera-chan78":"Menhera-chan/6.jpg","Menhera-chan79":"Menhera-chan/60.jpg","Menhera-chan80":"Menhera-chan/61.jpg","Menhera-chan81":"Menhera-chan/62.jpg","Menhera-chan82":"Menhera-chan/63.jpg","Menhera-chan83":"Menhera-chan/64.jpg","Menhera-chan84":"Menhera-chan/65.jpg","Menhera-chan85":"Menhera-chan/66.jpg","Menhera-chan86":"Menhera-chan/67.jpg","Menhera-chan87":"Menhera-chan/68.jpg","Menhera-chan88":"Menhera-chan/69.jpg","Menhera-chan89":"Menhera-chan/7.jpg","Menhera-chan90":"Menhera-chan/70.jpg","Menhera-chan91":"Menhera-chan/71.jpg","Menhera-chan92":"Menhera-chan/72.jpg","Menhera-chan93":"Menhera-chan/73.jpg","Menhera-chan94":"Menhera-chan/74.jpg","Menhera-chan95":"Menhera-chan/75.jpg","Menhera-chan96":"Menhera-chan/76.jpg","Menhera-chan97":"Menhera-chan/77.jpg","Menhera-chan98":"Menhera-chan/78.jpg","Menhera-chan99":"Menhera-chan/79.jpg","Menhera-chan100":"Menhera-chan/8.jpg","Menhera-chan101":"Menhera-chan/80.jpg","Menhera-chan102":"Menhera-chan/81.jpg","Menhera-chan103":"Menhera-chan/82.jpg","Menhera-chan104":"Menhera-chan/83.jpg","Menhera-chan105":"Menhera-chan/84.jpg","Menhera-chan106":"Menhera-chan/85.jpg","Menhera-chan107":"Menhera-chan/86.jpg","Menhera-chan108":"Menhera-chan/87.jpg","Menhera-chan109":"Menhera-chan/88.jpg","Menhera-chan110":"Menhera-chan/89.jpg","Menhera-chan111":"Menhera-chan/9.jpg","Menhera-chan112":"Menhera-chan/90.jpg","Menhera-chan113":"Menhera-chan/91.jpg","Menhera-chan114":"Menhera-chan/92.jpg","Menhera-chan115":"Menhera-chan/93.jpg","Menhera-chan116":"Menhera-chan/94.jpg","Menhera-chan117":"Menhera-chan/95.jpg","Menhera-chan118":"Menhera-chan/96.jpg","Menhera-chan119":"Menhera-chan/97.jpg","Menhera-chan120":"Menhera-chan/98.jpg","Menhera-chan121":"Menhera-chan/99.jpg","Sweetie-Bunny1":"Sweetie-Bunny/12311678.png","Sweetie-Bunny2":"Sweetie-Bunny/12311679.png","Sweetie-Bunny3":"Sweetie-Bunny/12311680.png","Sweetie-Bunny4":"Sweetie-Bunny/12311681.png","Sweetie-Bunny5":"Sweetie-Bunny/12311682.png","Sweetie-Bunny6":"Sweetie-Bunny/12311683.png","Sweetie-Bunny7":"Sweetie-Bunny/12311684.png","Sweetie-Bunny8":"Sweetie-Bunny/12311685.png","Sweetie-Bunny9":"Sweetie-Bunny/12311686.png","Sweetie-Bunny10":"Sweetie-Bunny/12311687.png","Sweetie-Bunny11":"Sweetie-Bunny/12311688.png","Sweetie-Bunny12":"Sweetie-Bunny/12311689.png","Sweetie-Bunny13":"Sweetie-Bunny/12311690.png","Sweetie-Bunny14":"Sweetie-Bunny/12311691.png","Sweetie-Bunny15":"Sweetie-Bunny/12311692.png","Sweetie-Bunny16":"Sweetie-Bunny/12311693.png","Sweetie-Bunny17":"Sweetie-Bunny/12311694.png","Sweetie-Bunny18":"Sweetie-Bunny/12311695.png","Sweetie-Bunny19":"Sweetie-Bunny/12311696.png","Sweetie-Bunny20":"Sweetie-Bunny/12311697.png","Sweetie-Bunny21":"Sweetie-Bunny/12311698.png","Sweetie-Bunny22":"Sweetie-Bunny/12311699.png","Sweetie-Bunny23":"Sweetie-Bunny/12311700.png","Sweetie-Bunny24":"Sweetie-Bunny/12311701.png","Sweetie-Bunny25":"Sweetie-Bunny/12311702.png","Sweetie-Bunny26":"Sweetie-Bunny/12311703.png","Sweetie-Bunny27":"Sweetie-Bunny/12311704.png","Sweetie-Bunny28":"Sweetie-Bunny/12311705.png","Sweetie-Bunny29":"Sweetie-Bunny/12311706.png","Sweetie-Bunny30":"Sweetie-Bunny/12311707.png","Sweetie-Bunny31":"Sweetie-Bunny/12311708.png","Sweetie-Bunny32":"Sweetie-Bunny/12311709.png","Sweetie-Bunny33":"Sweetie-Bunny/12311710.png","Sweetie-Bunny34":"Sweetie-Bunny/12311711.png","Sweetie-Bunny35":"Sweetie-Bunny/12311712.png","Sweetie-Bunny36":"Sweetie-Bunny/12311713.png","Sweetie-Bunny37":"Sweetie-Bunny/12311714.png","Sweetie-Bunny38":"Sweetie-Bunny/12311715.png","Sweetie-Bunny39":"Sweetie-Bunny/12311716.png","Sweetie-Bunny40":"Sweetie-Bunny/12311717.png","Majotabi1":"Majotabi/367516718.png","Majotabi2":"Majotabi/367516719.png","Majotabi3":"Majotabi/367516720.png","Majotabi4":"Majotabi/367516721.png","Majotabi5":"Majotabi/367516722.png","Majotabi6":"Majotabi/367516723.png","Majotabi7":"Majotabi/367516724.png","Majotabi8":"Majotabi/367516725.png","Majotabi9":"Majotabi/367516726.png","Majotabi10":"Majotabi/367516727.png","Majotabi11":"Majotabi/367516728.png","Majotabi12":"Majotabi/367516729.png","Majotabi13":"Majotabi/367516730.png","Majotabi14":"Majotabi/367516731.png","Majotabi15":"Majotabi/367516732.png","Majotabi16":"Majotabi/367516733.png","Majotabi17":"Majotabi/367516734.png","Majotabi18":"Majotabi/367516735.png","Majotabi19":"Majotabi/367516736.png","Majotabi20":"Majotabi/367516737.png","Majotabi21":"Majotabi/367516738.png","Majotabi22":"Majotabi/367516739.png","Majotabi23":"Majotabi/367516740.png","Majotabi24":"Majotabi/367516741.png","Majotabi25":"Majotabi/367516742.png","Majotabi26":"Majotabi/367516743.png","Majotabi27":"Majotabi/367516744.png","Majotabi28":"Majotabi/367516745.png","Majotabi29":"Majotabi/367516746.png","Majotabi30":"Majotabi/367516747.png","Majotabi31":"Majotabi/367516748.png","Majotabi32":"Majotabi/367516749.png","Majotabi33":"Majotabi/367516750.png","Majotabi34":"Majotabi/367516751.png","Majotabi35":"Majotabi/367516752.png","Majotabi36":"Majotabi/367516753.png","Majotabi37":"Majotabi/367516754.png","Majotabi38":"Majotabi/367516755.png","Majotabi39":"Majotabi/367516756.png","Majotabi40":"Majotabi/367516757.png","Snow-Miku1":"Snow-Miku/3583066@2x.png","Snow-Miku2":"Snow-Miku/3583067@2x.png","Snow-Miku3":"Snow-Miku/3583068@2x.png","Snow-Miku4":"Snow-Miku/3583069@2x.png","Snow-Miku5":"Snow-Miku/3583070@2x.png","Snow-Miku6":"Snow-Miku/3583071@2x.png","Snow-Miku7":"Snow-Miku/3583072@2x.png","Snow-Miku8":"Snow-Miku/3583073@2x.png","Snow-Miku9":"Snow-Miku/3583074@2x.png","Snow-Miku10":"Snow-Miku/3583075@2x.png","Snow-Miku11":"Snow-Miku/3583076@2x.png","Snow-Miku12":"Snow-Miku/3583077@2x.png","Snow-Miku13":"Snow-Miku/3583078@2x.png","Snow-Miku14":"Snow-Miku/3583079@2x.png","Snow-Miku15":"Snow-Miku/3583080@2x.png","Snow-Miku16":"Snow-Miku/3583081@2x.png","Snow-Miku17":"Snow-Miku/3583082@2x.png","Snow-Miku18":"Snow-Miku/3583083@2x.png","Snow-Miku19":"Snow-Miku/3583084@2x.png","Snow-Miku20":"Snow-Miku/3583085@2x.png","Snow-Miku21":"Snow-Miku/3583086@2x.png","Snow-Miku22":"Snow-Miku/3583087@2x.png","Snow-Miku23":"Snow-Miku/3583088@2x.png","Snow-Miku24":"Snow-Miku/3583089@2x.png","Snow-Miku25":"Snow-Miku/3583090@2x.png","Snow-Miku26":"Snow-Miku/3583091@2x.png","Snow-Miku27":"Snow-Miku/3583092@2x.png","Snow-Miku28":"Snow-Miku/3583093@2x.png","Snow-Miku29":"Snow-Miku/3583094@2x.png","Snow-Miku30":"Snow-Miku/3583095@2x.png","Snow-Miku31":"Snow-Miku/3583096@2x.png","Snow-Miku32":"Snow-Miku/3583097@2x.png","Snow-Miku33":"Snow-Miku/3583098@2x.png","Snow-Miku34":"Snow-Miku/3583099@2x.png","Snow-Miku35":"Snow-Miku/3583100@2x.png","Snow-Miku36":"Snow-Miku/3583101@2x.png","Snow-Miku37":"Snow-Miku/3583102@2x.png","Snow-Miku38":"Snow-Miku/3583103@2x.png","Snow-Miku39":"Snow-Miku/3583104@2x.png","Snow-Miku40":"Snow-Miku/3583105@2x.png"},
      enableQQ: true,
      path: window.location.pathname,
    }

    if (true) { 
      initData.requiredFields= ('nick,mail'.split(','))
    }
    
    if (false) {
      const otherData = false
      initData = Object.assign({}, initData, otherData)
    }
    
    const valine = new Valine(initData)
  }

  if (typeof Valine === 'function') initValine() 
  else getScript('https://cdn.jsdelivr.net/npm/valine/dist/Valine.min.js').then(initValine)
}

if ('Valine' === 'Valine' || !true) {
  if (true) btf.loadComment(document.querySelector('#vcomment'),loadValine)
  else setTimeout(loadValine, 0)
} else {
  function loadOtherComment () {
    loadValine()
  }
}</script><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script defer="defer" id="fluttering_ribbon" mobile="true" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script>(function(){
  const bp = document.createElement('script');
  const curProtocol = window.location.protocol.split(':')[0];
  if (curProtocol === 'https') {
    bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
  }
  else{
    bp.src = 'http://push.zhanzhang.baidu.com/push.js';
  }
  bp.dataset.pjax = ''
  const s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(bp, s);
})()</script></div></body></html>